<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../javascripts/qrcode.min.js"></script>
  <script src="../javascripts/config.js"></script>

</head>
<body>
  <p>下载吧</p>

  <div id="qrcode"></div>

  <bar></bar>
  <button onclick="download()">下载apk</button>
  <button onclick="scane()">二维码扫码</button>
  <bar></bar>
  <button onclick="goback()">返回</button>
  <script>
    
    function scane(){
      var url = config.ipv4+":"+config.port + "/download";
      new QRCode(document.getElementById("qrcode"), url)
    }

    function download(){
      window.open('/download',"_self")
    }

    function goback(){
      // var url = config.ipv4+":"+config.port 
      window.open("/","_self");
    }
  </script>
</body>
</html>